home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 23
/
AACD 23.iso
/
AACD
/
Programming
/
tek
/
msg
/
dropmsg.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-05-12
|
578b
|
39 lines
#include "tek/msg.h"
#include "tek/kn/exec.h"
/*
** TEKlib
** (C) 2001 TEK neoscientists
** all rights reserved.
**
** TVOID TDropMsg(TAPTR msg)
**
** drop message.
*/
TVOID TDropMsg(TAPTR mem)
{
if (mem)
{
TMSG *msg = ((TMSG *) mem) - 1;
TPORT *replyport = msg->replyport;
if (replyport)
{
msg->status = TMSG_STATUS_FAILED | TMSG_STATUS_PENDING;
kn_lock(&replyport->lock);
TAddTail(&replyport->msglist, (TNODE *) msg);
TSignal(replyport->sigtask, replyport->signal);
kn_unlock(&replyport->lock);
}
else
{
TMMUFreeHandle(msg);
}
}
}